package com.distributeredis.redis_springboot.springbootsendmailandlog.springlog;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SLf4jTest {
    public static final Logger LOGGER = LoggerFactory.getLogger(SLf4jTest.class);
    @Test
    public void test1() throws Exception {
        // 默认级别info,使用占位符输出日志信息
        String name = "itcast";
        Integer age = 23;
        LOGGER.info("用户信息：{},{}",name,age);

        try{
            int i = 1/0;
        }catch (Exception e) {
            LOGGER.info("出现异常",e);
        }
    }
}
